package com.syeet.gulimall.product.feign;

import com.syeet.common.to.SkuReductionTo;
import com.syeet.common.to.SpuBoundTo;
import com.syeet.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author xhl
 * @date 2022/5/20
 */
@FeignClient(value = "gulimall-coupon")
public interface CouponFeignService {
    /**
     * SpuBoundTo先转为json形式，在json形式转为SpuBoundsEntity（需保证成员属性相同即可）
     * 只需保证json数据模型一致即可，无需使用同一个to
     * @param spuBoundTo
     * @return
     */
    @PostMapping(value = "/coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundTo spuBoundTo);

    @PostMapping("/coupon/skufullreduction/saveinfo")
    R saveSkuReduction(@RequestBody SkuReductionTo skuReductionTo);

}
